Imports KanBan.Pgd.Domain.Exceptions
Imports KanBan.Pgd.Infrastructure.Exceptions
Imports KanBan.Pgd.Infrastructure.Repositories
Imports KanBan.Pgd.Domain.Entities

Public Class ShowPermissions

    Public Sub New(ByVal userId As Guid)
        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        Try

            Dim userRepository As New UserRepository()
            Dim user As User = userRepository.GetById(userId)

            lstPermissions.DataSource = userRepository.GetAllPermissions(user.Id) 'user.GetAllPermissions()
            lstPermissions.DisplayMember = "Name"

        Catch te As TechnicalException

            'Todo: Handle this exception properly
            Throw

        Catch bre As BusinessRuleException

            'Todo: Handle this exception properly
            Throw

        Catch ex As Exception

            'Todo: Handle this exception properly
            Throw

        End Try


    End Sub

End Class